<template>
  <div id="app">
    <book  :books="list"  />
  </div>
</template>
<script>
import book from './components/book'
import axios from 'axios'
axios.defaults.baseURL = ' http://liufusong.top:4000/'
export default {
  data () {
    return {
      list: []
    }
  },
  components: { book },
  created () {
    axios({
      url: 'books',
      method: 'GET'
    }).then((res) => {
      // console.log(res)
      this.list = res.data
    })
  },
  methods: {
  }
}
</script>
